<!--
  Generated template for the Approval page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

	<ion-navbar>
		<ion-title>收文传阅</ion-title>
		<ion-buttons end>
			<button ion-button icon-only (click)="dosearch()">
				<ion-icon name="search"></ion-icon>
			</button>
		</ion-buttons>
	</ion-navbar>
	<ion-toolbar no-border-top class="white">
		<ion-segment [(ngModel)]="selectIndex" (ionChange)="segmentChanged($event)">
			<ion-segment-button value="0">
				行政办公
			</ion-segment-button>
			<ion-segment-button value="1">
				人力资源
			</ion-segment-button>
			<!-- <ion-segment-button value="2">
				成本费用
			</ion-segment-button> -->
		</ion-segment>
	</ion-toolbar>
</ion-header>

<ion-content>
	<ion-refresher (ionRefresh)="doRefresh($event)">
		<ion-refresher-content></ion-refresher-content>
	</ion-refresher>
	<div [ngSwitch]="selectIndex">
		<div *ngSwitchCase="0">
			<ion-list class="search">
				<ion-item *ngFor="let item of listItems1" tappable (click)="dodetail(item)">
					<ion-label>
						<div>当前环节：{{item.taskName}}</div>
						<div>流程名称：{{item.procDefName}}</div>
						<div>任务内容：{{item.title}}</div>
						<div>流程发起人：{{item.applyUserId}}</div>
						<div>创建时间：{{item.taskCreateDate}}</div>
					</ion-label>
					<i class="iconfont icon-xiangqing" item-end></i>
				</ion-item>
			</ion-list>
			<div class="nodata" *ngIf="listItems1.length == 0">找不到您要的数据哦^</div>
		</div>
		<div *ngSwitchCase="1">
			<ion-list class="search">
				<ion-item *ngFor="let item of listItems2" tappable (click)="dodetail(item)">
					<div>当前环节：{{item.taskName}}</div>
					<div>流程名称：{{item.procDefName}}</div>
					<div>任务内容：{{item.title}}</div>
					<div>流程发起人：{{item.applyUserId}}</div>
					<div>创建时间：{{item.taskCreateDate}}</div>
					<i class="iconfont icon-xiangqing" item-end></i>
				</ion-item>
			</ion-list>
			<div class="nodata" *ngIf="listItems2.length == 0">找不到您要的数据哦^</div>
		</div>
		<!-- <div *ngSwitchCase="2">
			<ion-list class="search">
				<ion-item *ngFor="let item of listItems3" tappable (click)="dodetail(item)">
					<div>当前环节：{{item.taskName}}</div>
					<div>流程名称：{{item.procDefName}}</div>
					<div>任务内容：{{item.title}}</div>
					<div>流程发起人：{{item.applyUserId}}</div>
					<div>创建时间：{{item.taskCreateDate}}</div>
					<i class="iconfont icon-xiangqing" item-end></i>
				</ion-item>
			</ion-list>
			<div class="nodata" *ngIf="listItems3.length == 0">找不到您要的数据哦^</div>
		</div> -->
	</div>
	<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
		<ion-infinite-scroll-content></ion-infinite-scroll-content>
	</ion-infinite-scroll>
</ion-content>